<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * App\Models\Task
 *
 * @property int $id
 * @property string $task_title
 * @property int $start_read_amount
 * @property int $target_read_amount
 * @property int $start_like_amount
 * @property int $target_like_amount
 * @property int $valid_read_amount
 * @property int $valid_like_amount
 * @property int $duration 持续天数(多少天完成这项任务)
 * @property int $status
 * @property string|null $finished_at
 * @property int $user_id
 * @property string|null $urls
 * @property int $rate_type 速率曲线
 * @property \Carbon\Carbon|null $created_at
 * @property \Carbon\Carbon|null $updated_at
 * @property string|null $deleted_at
 * @method static bool|null forceDelete()
 * @method static \Illuminate\Database\Query\Builder|\App\Models\Task onlyTrashed()
 * @method static bool|null restore()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereArticleTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereCreatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereDeletedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereDuration($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereFinishedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereRateType($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereStartLikeAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereStartReadAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereStatus($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereTargetLikeAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereTargetReadAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereTaskTitle($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereUpdatedAt($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereUrls($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereUserId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereValidLikeAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereValidReadAmount($value)
 * @method static \Illuminate\Database\Query\Builder|\App\Models\Task withTrashed()
 * @method static \Illuminate\Database\Query\Builder|\App\Models\Task withoutTrashed()
 * @mixin \Eloquent
 * @property string|null $article_title
 * @property int $current_read_amount
 * @property int $current_like_amount
 * @property int $enable
 * @property string|null $date
 * @property int $rate_type_id 速率曲线
 * @property-read \App\Models\RateType $rateType
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereCurrentLikeAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereCurrentReadAmount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereDate($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereEnable($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Task whereRateTypeId($value)
 */
class Task extends Model
{
    use SoftDeletes;

    public function rateType(){
       return $this->hasOne(RateType::class,'id','rate_type_id');
    }
}
